home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_08
/
saks
/
locstruc.cpp
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-06-06
|
379 b
|
21 lines
Listing 1 - A suggested use for a struct definition local
to a block.
int xlate(const char *s)
{
struct entry
{
const char *s;
int v;
};
static const entry xtab[] =
{
{ ..., ... },
...
{ ..., ... }
};
/*
* convert s to int by table lookup using xtab
*/
}